#include <iostream>
#include <cstdio>
#include <cmath>
#include <queue>
#include <cstring>
using namespace std;

inline void File_Read() {
#ifdef MYLAB
	freopen("in.txt", "r", stdin);
#endif
}
inline int get_num() {
	int k = 0, f = 1;
	char c = getchar();
	for(; !isdigit(c); c = getchar())if(c == '-') f = -1;
	for(; isdigit(c); c = getchar()) k = k * 10 + c - '0';
	return k;
}

int n, m, k, a[233], le, ri, ans; 
bool l, r;

int main() {
//	File_Read();
	n = get_num();
	m = get_num();
	k = get_num();
	memset(a, 127, sizeof(a));
	for(int i = 1; i <= n; i++) {
		a[i] = get_num();
	}
	ri = le = m;
	while(true) {
		ans += 10;
		le--;
		if(!le) l = 1;
		ri++;
		if(!ri) r = 1;
		if(((a[le] <= k && !l && a[le]) || (a[ri] <= k && !r && a[ri]))) {
			break;
		}
	}
	printf("%d", ans);
	return 0;
}
